import torch
import torchvision
import torchvision.transforms as transforms
import torch.nn as nn
import torch.optim as optim
import numpy as np
import os
from torch.optim.lr_scheduler import CosineAnnealingLR


from spikingjelly.activation_based import neuron, functional, layer

script_dir = os.path.dirname(os.path.abspath(__file__))

data_dir = os.path.join(script_dir, 'data')
os.makedirs(data_dir, exist_ok=True)
trainset = torchvision.datasets.FashionMNIST(data_dir, download=True, train=True)
testset = torchvision.datasets.FashionMNIST(data_dir, download=True, train=False)
